package com.ukao.pad.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.ukao.pad.utils.CheckUtils;
import com.ukao.pad.utils.L;


import java.util.List;

/**
 * Created by ukaodev on 2017/7/31.
 */

public class RecheckBean  extends   BaseBean<RecheckBean> implements Parcelable {



        /**
         * proTotal : 1
         * productImgList : []
         * proIndex : 1
         * needShelf : false

         * productInfo : {"factoryCode":"62252644","no":1,"productImgCnt":0,"orderId":263,"businessId":1,"businessName":"洗衣","isEnableStockRework":true,"cityId":1,"addServiceDesc":null,"productName":"修衣领","tranTypeText":"输送线","saleAmt":4800,"total":1,"statusVal":19,"factoryShelfNo":null,"storeName":"友靠麓云店","id":436,"colorDesc":null,"flawDesc":null,"serviceAmt":1200,"brandName":"","orderNo":"2017101047573386","productId":35,"isEnableSign":false,"factoryName":"观象二路","serviceName":"清洗","userId":76,"scanCode":"396590992369","orderStatusId":702,"statusId":821,"annexDesc":null,"createTime":1507628237000,"subtotal":4800,"statusText":"洗完，待配送","brandId":null,"proTypeId":37,"tranNum":19,"effectDesc":null}
         */
        private  boolean    print;  /*是否打印*/
        private  Integer  shelfMode;
        private int proTotal;  // 共n件
        private int proIndex;     //第i件
        private boolean needShelf;   // 是否需要设置上架号
        private ProductInfoBean productInfo;
        private List<ProductRelImgBean> productImgList;
        private  String  errorMsg;
         private List<ClothingInformationBean.AnnexListBean> annexList;

    public List<ClothingInformationBean.AnnexListBean> getAnnexList() {
        return annexList;
    }

    public void setAnnexList(List<ClothingInformationBean.AnnexListBean> annexList) {
        this.annexList = annexList;
    }

    public boolean isPrint() {
        return print;
    }

    public boolean getShelfMode() {
        boolean  isShelfMode=false;
        L.i("shelfMode="+shelfMode);
                if (null!=shelfMode&&shelfMode==2){/*等于2的时候代表手动上架*/
                    isShelfMode=true;
                }

        return isShelfMode;
    }


    public String getErrorMsg() {
        return errorMsg;
    }

    public void setShelfMode(Integer shelfMode) {
        this.shelfMode = shelfMode;
    }

    public int getProTotal() {
            return proTotal;
        }

        public void setProTotal(int proTotal) {
            this.proTotal = proTotal;
        }

        public int getProIndex() {
            return proIndex;
        }

        public void setProIndex(int proIndex) {
            this.proIndex = proIndex;
        }

        public boolean isNeedShelf() {
            return needShelf;
        }

        public void setNeedShelf(boolean needShelf) {
            this.needShelf = needShelf;
        }

        public ProductInfoBean getProductInfo() {
            return productInfo;
        }

        public void setProductInfo(ProductInfoBean productInfo) {
            this.productInfo = productInfo;
        }

        public List<ProductRelImgBean> getProductImgList() {
            return productImgList;
        }

        public void setProductImgList(List<ProductRelImgBean> productImgList) {
            this.productImgList = productImgList;
        }
    public static class AnnexListBean {

        /**
         * bindCode : 12
         * bindAliasCode : null
         * productName : 55hh

         * scanCode : 1191982048366
         * pid : 2312
         * tranNum : null
         * id : 2316
         */


        private long statusTime;  //操作时间
        private String statusWorkName;
        private String bindCode;
        private Object bindAliasCode;
        private String productName;
        private String scanCode;
        private String statusText;  //状态
        private int pid;
        private int tranNum;
        private int id;

        public long getStatusTime() {
            return statusTime;
        }

        public void setStatusTime(long statusTime) {
            this.statusTime = statusTime;
        }

        public String getStatusWorkName() {
            return statusWorkName;
        }

        public void setStatusWorkName(String statusWorkName) {
            this.statusWorkName = statusWorkName;
        }

        public String getStatusText() {
            return statusText;
        }

        public void setStatusText(String statusText) {
            this.statusText = statusText;
        }

        public String getBindCode() {
            return bindCode;
        }

        public void setBindCode(String bindCode) {
            this.bindCode = bindCode;
        }

        public Object getBindAliasCode() {
            return bindAliasCode;
        }

        public void setBindAliasCode(Object bindAliasCode) {
            this.bindAliasCode = bindAliasCode;
        }

        public String getProductName() {
            return productName;
        }

        public void setProductName(String productName) {
            this.productName = productName;
        }

        public String getScanCode() {
            return scanCode;
        }

        public void setScanCode(String scanCode) {
            this.scanCode = scanCode;
        }

        public int getPid() {
            return pid;
        }

        public void setPid(int pid) {
            this.pid = pid;
        }

        public int getTranNum() {
            return tranNum;
        }

        public void setTranNum(int tranNum) {
            this.tranNum = tranNum;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }
    }
        public static class ProductInfoBean implements Parcelable {

            /**
             * factoryCode : 62252644
             * no : 1
             * productImgCnt : 0
             * orderId : 263
             * businessId : 1
             * businessName : 洗衣
             * isEnableStockRework : true
             * cityId : 1
             * addServiceDesc : null
             * productName : 修衣领
             * tranTypeText : 输送线
             * saleAmt : 4800
             * total : 1
             * statusVal : 19
             * factoryShelfNo : null
             * storeName : 友靠麓云店
             * id : 436
             * colorDesc : null
             * flawDesc : null
             * serviceAmt : 1200
             * brandName :
             * orderNo : 2017101047573386
             * productId : 35
             * isEnableSign : false
             * factoryName : 观象二路
             * serviceName : 清洗
             * userId : 76
             * scanCode : 396590992369
             * orderStatusId : 702
             * statusId : 821
             * annexDesc : null
             * createTime : 1507628237000
             * subtotal : 4800
             * statusText : 洗完，待配送
             * brandId : null
             * proTypeId : 37
             * tranNum : 19
             * effectDesc : null
             */

            private   int  hasRefund;
            private String factoryCode;
            private int no;
            private String productImgCnt;
            private int orderId;
            private String businessId;
            private String businessName;
            private boolean isEnableStockRework;
            private int cityId;
            private String addServiceDesc;
            private String productName;
            private String tranTypeText;
            private int saleAmt;
            private int total;
            private int statusVal;
            private String factoryShelfNo;  // factoryShelfNo  上架号

            private  String  storeId;
            private String storeName;
            private String id;
            private String colorDesc;
            private String flawDesc;
            private int serviceAmt;
            private String brandName;
            private String orderNo;
            private int productId;
            private boolean isEnableSign;
            private String factoryName;
            private String serviceName;
            private int userId;
            private String scanCode;
            private int orderStatusId;
            private int statusId;
            private String annexDesc;
            private long createTime;
            private int subtotal;
            private String statusText;
            private String brandId;
            private int proTypeId;
            private int tranNum;
            private String effectDesc;
            private String  mark;
            private String bindAliasCode;
            private String  bindCode;
            private long statusTime;
            private String statusWorkName;
            private String picCnt;
            private long stationCreateTime;

            public long getStationCreateTime() {
                return stationCreateTime;
            }

            public void setStationCreateTime(long stationCreateTime) {
                this.stationCreateTime = stationCreateTime;
            }

            public String getPicCnt() {
                return picCnt;
            }

            public void setPicCnt(String picCnt) {
                this.picCnt = picCnt;
            }

            public String getStatusWorkName() {
                return statusWorkName;
            }

            public void setStatusWorkName(String statusWorkName) {
                this.statusWorkName = statusWorkName;
            }

            public long getStatusTime() {
                return statusTime;
            }

            public void setStatusTime(long statusTime) {
                this.statusTime = statusTime;
            }

            public String getBindAliasCode() {
                return bindAliasCode;
            }

            public void setBindAliasCode(String bindAliasCode) {
                this.bindAliasCode = bindAliasCode;
            }

            public String getBindCode() {
                return bindCode;
            }

            public void setBindCode(String bindCode) {
                this.bindCode = bindCode;
            }

            public int getHasRefund() {
                return hasRefund;
            }

            public String getMark() {
                return mark;
            }
            public String getStoreId() {
                return storeId;
            }

            public String getFactoryCode() {
                return factoryCode;
            }

            public void setFactoryCode(String factoryCode) {
                this.factoryCode = factoryCode;
            }

            public int getNo() {
                return no;
            }

            public void setNo(int no) {
                this.no = no;
            }

            public String getProductImgCnt() {
                return productImgCnt;
            }

            public void setProductImgCnt(String productImgCnt) {
                this.productImgCnt = productImgCnt;
            }

            public int getOrderId() {
                return orderId;
            }

            public void setOrderId(int orderId) {
                this.orderId = orderId;
            }

            public String getBusinessId() {
                return businessId;
            }

            public void setBusinessId(String businessId) {
                this.businessId = businessId;
            }

            public String getBusinessName() {
                return businessName;
            }

            public void setBusinessName(String businessName) {
                this.businessName = businessName;
            }

            public boolean isIsEnableStockRework() {
                return isEnableStockRework;
            }

            public void setIsEnableStockRework(boolean isEnableStockRework) {
                this.isEnableStockRework = isEnableStockRework;
            }

            public int getCityId() {
                return cityId;
            }

            public void setCityId(int cityId) {
                this.cityId = cityId;
            }

            public String getAddServiceDesc() {
                return addServiceDesc;
            }

            public void setAddServiceDesc(String addServiceDesc) {
                this.addServiceDesc = addServiceDesc;
            }

            public String getProductName() {
                return productName;
            }

            public void setProductName(String productName) {
                this.productName = productName;
            }

            public String getTranTypeText() {
                return tranTypeText;
            }

            public void setTranTypeText(String tranTypeText) {
                this.tranTypeText = tranTypeText;
            }

            public int getSaleAmt() {
                return saleAmt;
            }

            public void setSaleAmt(int saleAmt) {
                this.saleAmt = saleAmt;
            }

            public int getTotal() {
                return total;
            }

            public void setTotal(int total) {
                this.total = total;
            }

            public int getStatusVal() {
                return statusVal;
            }

            public void setStatusVal(int statusVal) {
                this.statusVal = statusVal;
            }

            public String getFactoryShelfNo() {
                return CheckUtils.isEmptyString(factoryShelfNo);
            }

            public void setFactoryShelfNo(String factoryShelfNo) {
                this.factoryShelfNo = factoryShelfNo;
            }

            public String getStoreName() {
                return storeName;
            }

            public void setStoreName(String storeName) {
                this.storeName = storeName;
            }

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public String getColorDesc() {
                return colorDesc;
            }

            public void setColorDesc(String colorDesc) {
                this.colorDesc = colorDesc;
            }

            public String getFlawDesc() {
                return flawDesc;
            }

            public void setFlawDesc(String flawDesc) {
                this.flawDesc = flawDesc;
            }

            public int getServiceAmt() {
                return serviceAmt;
            }

            public void setServiceAmt(int serviceAmt) {
                this.serviceAmt = serviceAmt;
            }

            public String getBrandName() {
                return brandName;
            }

            public void setBrandName(String brandName) {
                this.brandName = brandName;
            }

            public String getOrderNo() {
                return orderNo;
            }

            public void setOrderNo(String orderNo) {
                this.orderNo = orderNo;
            }

            public int getProductId() {
                return productId;
            }

            public void setProductId(int productId) {
                this.productId = productId;
            }

            public boolean isIsEnableSign() {
                return isEnableSign;
            }

            public void setIsEnableSign(boolean isEnableSign) {
                this.isEnableSign = isEnableSign;
            }

            public String getFactoryName() {
                return factoryName;
            }

            public void setFactoryName(String factoryName) {
                this.factoryName = factoryName;
            }

            public String getServiceName() {
                return serviceName;
            }

            public void setServiceName(String serviceName) {
                this.serviceName = serviceName;
            }

            public int getUserId() {
                return userId;
            }

            public void setUserId(int userId) {
                this.userId = userId;
            }

            public String getScanCode() {
                return scanCode;
            }

            public void setScanCode(String scanCode) {
                this.scanCode = scanCode;
            }

            public int getOrderStatusId() {
                return orderStatusId;
            }

            public void setOrderStatusId(int orderStatusId) {
                this.orderStatusId = orderStatusId;
            }

            public int getStatusId() {
                return statusId;
            }

            public void setStatusId(int statusId) {
                this.statusId = statusId;
            }

            public String getAnnexDesc() {
                return annexDesc;
            }

            public void setAnnexDesc(String annexDesc) {
                this.annexDesc = annexDesc;
            }

            public long getCreateTime() {
                return createTime;
            }

            public void setCreateTime(long createTime) {
                this.createTime = createTime;
            }

            public int getSubtotal() {
                return subtotal;
            }

            public void setSubtotal(int subtotal) {
                this.subtotal = subtotal;
            }

            public String getStatusText() {
                return statusText;
            }

            public void setStatusText(String statusText) {
                this.statusText = statusText;
            }

            public Object getBrandId() {
                return brandId;
            }

            public void setBrandId(String brandId) {
                this.brandId = brandId;
            }

            public int getProTypeId() {
                return proTypeId;
            }

            public void setProTypeId(int proTypeId) {
                this.proTypeId = proTypeId;
            }

            public int getTranNum() {
                return tranNum;
            }

            public void setTranNum(int tranNum) {
                this.tranNum = tranNum;
            }

            public String getEffectDesc() {
                return effectDesc;
            }

            public void setEffectDesc(String effectDesc) {
                this.effectDesc = effectDesc;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeInt(this.hasRefund);
                dest.writeString(this.factoryCode);
                dest.writeInt(this.no);
                dest.writeString(this.productImgCnt);
                dest.writeInt(this.orderId);
                dest.writeString(this.businessId);
                dest.writeString(this.businessName);
                dest.writeByte(this.isEnableStockRework ? (byte) 1 : (byte) 0);
                dest.writeInt(this.cityId);
                dest.writeString(this.addServiceDesc);
                dest.writeString(this.productName);
                dest.writeString(this.tranTypeText);
                dest.writeInt(this.saleAmt);
                dest.writeInt(this.total);
                dest.writeInt(this.statusVal);
                dest.writeString(this.factoryShelfNo);
                dest.writeString(this.storeId);
                dest.writeString(this.storeName);
                dest.writeString(this.id);
                dest.writeString(this.colorDesc);
                dest.writeString(this.flawDesc);
                dest.writeInt(this.serviceAmt);
                dest.writeString(this.brandName);
                dest.writeString(this.orderNo);
                dest.writeInt(this.productId);
                dest.writeByte(this.isEnableSign ? (byte) 1 : (byte) 0);
                dest.writeString(this.factoryName);
                dest.writeString(this.serviceName);
                dest.writeInt(this.userId);
                dest.writeString(this.scanCode);
                dest.writeInt(this.orderStatusId);
                dest.writeInt(this.statusId);
                dest.writeString(this.annexDesc);
                dest.writeLong(this.createTime);
                dest.writeInt(this.subtotal);
                dest.writeString(this.statusText);
                dest.writeString(this.brandId);
                dest.writeInt(this.proTypeId);
                dest.writeInt(this.tranNum);
                dest.writeString(this.effectDesc);
                dest.writeString(this.mark);
            }

            public ProductInfoBean() {
            }

            protected ProductInfoBean(Parcel in) {
                this.hasRefund = in.readInt();
                this.factoryCode = in.readString();
                this.no = in.readInt();
                this.productImgCnt = in.readString();
                this.orderId = in.readInt();
                this.businessId = in.readString();
                this.businessName = in.readString();
                this.isEnableStockRework = in.readByte() != 0;
                this.cityId = in.readInt();
                this.addServiceDesc = in.readString();
                this.productName = in.readString();
                this.tranTypeText = in.readString();
                this.saleAmt = in.readInt();
                this.total = in.readInt();
                this.statusVal = in.readInt();
                this.factoryShelfNo = in.readString();
                this.storeId = in.readString();
                this.storeName = in.readString();
                this.id = in.readString();
                this.colorDesc = in.readString();
                this.flawDesc = in.readString();
                this.serviceAmt = in.readInt();
                this.brandName = in.readString();
                this.orderNo = in.readString();
                this.productId = in.readInt();
                this.isEnableSign = in.readByte() != 0;
                this.factoryName = in.readString();
                this.serviceName = in.readString();
                this.userId = in.readInt();
                this.scanCode = in.readString();
                this.orderStatusId = in.readInt();
                this.statusId = in.readInt();
                this.annexDesc = in.readString();
                this.createTime = in.readLong();
                this.subtotal = in.readInt();
                this.statusText = in.readString();
                this.brandId = in.readString();
                this.proTypeId = in.readInt();
                this.tranNum = in.readInt();
                this.effectDesc = in.readString();
                this.mark = in.readString();
            }

            public static final Creator<ProductInfoBean> CREATOR = new Creator<ProductInfoBean>() {
                @Override
                public ProductInfoBean createFromParcel(Parcel source) {
                    return new ProductInfoBean(source);
                }

                @Override
                public ProductInfoBean[] newArray(int size) {
                    return new ProductInfoBean[size];
                }
            };
        }

    public RecheckBean() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeByte(this.print ? (byte) 1 : (byte) 0);
        dest.writeValue(this.shelfMode);
        dest.writeInt(this.proTotal);
        dest.writeInt(this.proIndex);
        dest.writeByte(this.needShelf ? (byte) 1 : (byte) 0);
        dest.writeParcelable(this.productInfo, flags);
        dest.writeTypedList(this.productImgList);
        dest.writeString(this.errorMsg);
    }

    protected RecheckBean(Parcel in) {
        this.print = in.readByte() != 0;
        this.shelfMode = (Integer) in.readValue(Integer.class.getClassLoader());
        this.proTotal = in.readInt();
        this.proIndex = in.readInt();
        this.needShelf = in.readByte() != 0;
        this.productInfo = in.readParcelable(ProductInfoBean.class.getClassLoader());
        this.productImgList = in.createTypedArrayList(ProductRelImgBean.CREATOR);
        this.errorMsg = in.readString();
    }

    public static final Creator<RecheckBean> CREATOR = new Creator<RecheckBean>() {
        @Override
        public RecheckBean createFromParcel(Parcel source) {
            return new RecheckBean(source);
        }

        @Override
        public RecheckBean[] newArray(int size) {
            return new RecheckBean[size];
        }
    };
}
